<?php
if (isset($this->news)) {
    $model = new PageModel();
    if ($this->full == true) {
        ?>
        <div id="page_news">
            <?php echo '<h1>' . $this->news->title . '</h1>'; ?>
            <?php echo $model->replaceLinks($this->news->long) ?>
        </div>
    <?php } else { //Список вестей с полей
        ?>
        <div id="page_news">
            <h1><?php echo $this->page->name ?></h1>
            <?php
            $array = $this->news;
            foreach ($array as $key => $val) {
                echo '<div class="news_block">
                    <div class="news_preview">';
                if ($val->preview <> '')
                    echo '<img src="' . $val->preview . '" />';
                echo '</div>
                    <div class="news_short">
                         <span class="news_date">' . date($this->config->time, strtotime($val->date)) . ' | </span>
                         <a href="' . SITE_URL . PAGE_URL . '/post/' . $val->id . '" class="news_title" >' . $val->title . '</a>' .
                $model->replaceLinks($val->short) . '
                    </div>
                    <div class="clear">&nbsp;</div>
                  </div>';
            }
            ?>
            <?php echo $this->partial('paginator.phtml', array('paginator' => $this->paginator, 't' => $this->t)); ?>
        </div>
    <?php }
} ?>